package com.example.service.impl;

import com.example.entity.User;
import com.example.mapper.UserMapper;
import com.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: Nostalgia
 * @Date: 2020/6/16 09:54
 * @Description:
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public int getUsername(String username) {
        return userMapper.getUsername(username);
    }

    @Override
    public int getPhone(String phone) {
        return userMapper.getPhone(phone);
    }

    @Override
    public User getUserByUsername(String username) {
        return userMapper.getUserByUsername(username);
    }
   }
